<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
    <title> Products </title>
    <link href="<?echo base_url();?>css/main_view.css" rel="stylesheet" type="text/css" />
    <link href="<?echo base_url();?>css/product_view.css" rel="stylesheet" type="text/css"/>
    <link href="<?echo base_url();?>css/ui/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/>
    <script src="<?echo base_url();?>jscripts/jquery-1.7.js" type="text/javascript"></script>
    <script src="<?echo base_url();?>jscripts/product_list_view.js" type="text/javascript"></script>
    <script src="<?echo base_url();?>jscripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
    <script src="<?echo base_url();?>jscripts/jquery.form.js" type="text/javascript"></script>
    <script type="text/javascript">
            $.ProductListData = {
                CreateProductUrl : "<?echo base_url();?>Product/Create",
                EditProductUrl : "<?echo base_url();?>Product/Edit",
                DeleteProductUrl : "<?echo base_url();?>Product/Delete"
            }
            $(document).ready(ProductListView.OnLoad);
    </script>
</head>

<body>
    <div id="carrier">		
		<?
		include("application/views/blocks/login_menu.php");
		include("application/views/blocks/header.php");
		include("application/views/blocks/main_menu.php");
		?>
        <div class='b-center-column'>
            <h3>
			Your products:
          	<br/>
                <button class="add-button" ></button>
                <button class="edit-button" ></button>
                <button class="delete-button" ></button>
            </h3>
            <table id='products-table' cellspacing="0">
                <thead>
                    <tr>
                        <th>
                            Product code
                        </th>
                        <th>
                            Name
                        </th>
                        <th>
                            Short information
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <?
                    foreach($products as $product){

                        echo"<tr>
                                <td>
                                    <input type='hidden' value='".$product['ProductCode']."'/>
                                   ".$product['ProductCode']." 
                                </td>
                                <td>
                                    ".$product['Name']." 
                                </td>
                                <td>
                                    ".$product['ShortInfo']."
                                </td>
                            </tr>";

                    }
                    ?>
                </tbody>
            </table>
        </div>
        <?
        include("blocks/footer.php");
        ?>
    </div>
</body>

</html>